/**
 * Created by jiadx on 2015/11/13.
 */
define(['ionic', 'ionicU9', 'js/controllers', 'js/services', 'js/directives', 'js/utility'], function () {
    angular.module('SalesShipments', ['ionic', 'ionicU9', 'SalesShipments.controllers', 'SalesShipments.services', 'SalesShipments.directives', 'SOSalesShipments.utility'])
        .run(function () {
            ionic.Platform.isFullScreen = true;
        })
        .config(['$stateProvider', '$urlRouterProvider', '$ionicConfigProvider', function ($stateProvider, $urlRouterProvider, $ionicConfigProvider) {
            $stateProvider
                .state('division', {
                    url: '/division',
                    templateUrl: 'tpls/division.html',
                    controller: 'DivisionCtrl'
                })
                .state('contact', {
                    url: '/contact',
                    cache: false,
                    templateUrl: 'tpls/contact.html',
                    controller: 'ContactCtrl'
                })
                .state('merchandise', {
                    url: '/merchandise',
                    cache: false,
                    templateUrl: 'tpls/merchandise.html',
                    controller: 'MerchandiseCtrl'
                })
                .state('order', {
                    url: '/order',
                    cache: false,
                    templateUrl: 'tpls/order.html',
                    controller: 'OrderCtrl'
                })
            ;
            $urlRouterProvider.otherwise('/division');

            $ionicConfigProvider.platform.android.navBar.alignTitle('center');
            $ionicConfigProvider.platform.android.backButton.previousTitleText(false);
            $ionicConfigProvider.platform.android.navBar.transition('view');
            $ionicConfigProvider.platform.android.views.transition('ios');
            $ionicConfigProvider.platform.android.views.swipeBackEnabled(true);
            $ionicConfigProvider.platform.android.views.swipeBackHitWidth(45);
            $ionicConfigProvider.platform.android.tabs.style('standard');
            $ionicConfigProvider.platform.android.tabs.position('bottom');
            $ionicConfigProvider.platform.android.form.toggle('large');
            $ionicConfigProvider.platform.default.backButton.previousTitleText(false);
            $ionicConfigProvider.platform.default.backButton.text(false);

        }]);
});